﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleGameData.MinMax
{
    public struct MinMaxFloat
    {
        #region Fields

        // minimum value of MinMaxFloat struct
        private float minValue;
        // maximum value of MinMaxFloat struct
        private float maxValue;

        #endregion

        #region Properties

        /// <summary>
        /// Returns the min value.
        /// </summary>
        public float MinValue
        {
            get { return minValue; }
            set { minValue = value; }
        }

        /// <summary>
        /// Returns the max value.
        /// </summary>
        public float MaxValue
        {
            get { return maxValue; }
            set { maxValue = value; }
        }

        /// <summary>
        /// Returns a MinMaxFloat struct with all its components set to 0.
        /// </summary>
        public static MinMaxFloat Zero
        {
            get
            {
                return new MinMaxFloat(0f, 0f);
            }
        }

        /// <summary>
        /// Returns a MinMaxFloat struct with all its components set to 1.
        /// </summary>
        public static MinMaxFloat One
        {
            get
            {
                return new MinMaxFloat(1f, 1f);
            }
        }

        #endregion

        #region Constructors

	    public MinMaxFloat(float both)
	    {
		    this.minValue = both;
		    this.maxValue = both;
	    }

	    public MinMaxFloat(float min, float max)
	    {
		    this.minValue = min;
		    this.maxValue = max;
	    }

        #endregion
    }
}
